copp\copp\copp3\opt3/mod.rs
1//! Optimization backends for third-order path parameterization (Clarabel-based).
2//!
3//! # Method identity
4//! This module provides optimization formulations for third-order problems:
5//! - **TOPP3** (time-optimal),
6//! - **COPP3** (convex-objective).
7//!
8//! # Contents
9//! - `clarabel_constraints`: shared standard TOPP3/COPP3 constraint assembly.
10//! - [`topp3_lp`](crate::solver::topp3_lp::topp3_lp): internal LP baseline for regression comparison.
11//! - [`topp3_socp`](crate::solver::topp3_socp::topp3_socp): TOPP3 SOCP backend.
12//! - [`copp3_socp`](crate::solver::copp3_socp::copp3_socp): COPP3 SOCP backend with normal/expert/core layering.
13
14use clarabel::solver::{DefaultSolution, LinearSolverInfo};
15
16use crate::copp::copp3::Topp3Profile;
17
18pub(crate) mod clarabel_constraints;
19pub(crate) mod copp3_socp;
20pub(crate) mod topp3_lp;
21pub(crate) mod topp3_socp;
22
23/// Clarabel expert result for third-order optimization backends.
24///
25/// This extends the public expert tuple `(Option<Topp3Profile>, DefaultSolution<f64>)`
26/// with solver-side metadata that Clarabel stores outside [`DefaultSolution`](clarabel::solver::DefaultSolution).
27/// The high-level `result` field is `Some(Topp3Profile { .. })` only when
28/// the solver status is accepted by the provided [`ClarabelOptions`](crate::solver::copp2_socp::ClarabelOptions).
29pub struct ClarabelExpertInfor3rd {
30 /// Accepted third-order profile, or `None` when
31 /// the solver status is not accepted.
32 pub result: Option<Topp3Profile>,
33 /// Raw Clarabel solution, including primal/dual/slack vectors and status.
34 pub solution: DefaultSolution<f64>,
35 /// Clarabel linear-solver metadata captured before the solver object is
36 /// consumed.
37 pub linsolver: LinearSolverInfo,
38}